import Vue from 'vue'
import Vuex from 'vuex'
import vuexPersist from 'vuex-persist'
import {createApp} from 'vue'
const vuexLocal=new vuexPersist({
    storage:window.localStorage
  })
  const app = createApp(Vue)

app.use(Vuex)
export default new Vuex.Store({
    state: {
      token:'',
      tree:[],
      top:0,
      left:0
     },
     getters: {
          
     },
     mutations: {
      settoken(state,token){
        state.token=token
      },
      settree(state,tree){
        state.tree=tree
      },
      settop(state,top){
        state.top=top
      },
      setleft(state,left){
        state.left=left
      },
     },
     actions: {
     },
     modules: {
     },
     plugins:[vuexLocal.plugin]
})


